package tt.dz.appserver.entity.model;

import java.io.Serializable;

import com.alibaba.fastjson.JSONObject;

import tt.dz.appserver.util.annotation.PrimaryKey;
import tt.dz.appserver.util.annotation.Table;

@Table(name="users",referenceQuery=true)
public class Tb_user implements Serializable{

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 1L;
	
	@PrimaryKey
	private String id;
	@PrimaryKey
	private String username;
	private transient String pwd;
	private Integer valid_flag;
	private String roleid;
	
	@tt.dz.appserver.util.annotation.Ignore
	private ResultMappingEntity entity;
	
	public ResultMappingEntity getEntity() {
		return entity;
	}
	public void setEntity(ResultMappingEntity entity) {
		this.entity = entity;
	}
	public String getRoleid() {
		return roleid;
	}
	public void setRoleid(String roleid) {
		this.roleid = roleid;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPwd() {
		return pwd;
	}
	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
	public Integer getValid_flag() {
		return valid_flag;
	}
	public void setValid_flag(Integer valid_flag) {
		this.valid_flag = valid_flag;
	}
	public static void main(String[] args) {
		Tb_user u = new Tb_user();
		u.setId("1");
		u.setPwd("123");
		u.setRoleid("1");
		u.setUsername("username");
		u.setValid_flag(1);
		System.out.println(JSONObject.toJSONString(u));
	}
}
